package cn.tedu.egarticle0616.base.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.tags.Tag;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Arrays;
import java.util.List;

@Configuration
public class Knife4jConfig {
    @Bean
    public OpenAPI costomOpenAPI(){
        return new OpenAPI().tags(getTagsOrdered());
    }
    private List<Tag> getTagsOrdered(){
        return Arrays.asList(
                new Tag().name("01-用户模块").description("用于管理用户的接口"),
                new Tag().name("02-文章模块").description("用于管理文章的接口")
        );
    }
}
